Page({
  data: {
    currentTab:0,
    tab:4,
    ppzx:'../img/product/ppzx.png',
    xpsj: '../img/product/xpsj.png',
    pro:[{
      pic:'../img/product/1.png',
      dec:'三的 SD-JR02绞肉机家用电动小型搅馅切菜打碎肉机蒜泥蒜蓉搅拌机',
      price:69
    }, {
      pic: '../img/product/2.png',
      dec: '三的 SD-JR09绞肉机家用电动碎肉机不锈钢搅拌机小型搅馅打蒜蓉',
      price: 99
      }, {
        pic: '../img/product/3.png',
        dec: '三的 SD-JR10家用绞肉机全自动大容量商用碎肉机碎菜搅馅切丝切片',
        price: 299
    }, {
      pic: '../img/product/4.png',
      dec: '三的 SD-JR303绞肉机家用电动小型搅馅切菜打碎肉机蒜泥蒜蓉搅拌机',
      price: 239
    }],
    pro1: [{
      pic: '../img/product/4.png',
      dec: '三的 SD-JR02绞肉机家用电动小型搅馅切菜打碎肉机蒜泥蒜蓉搅拌机',
      price: 69
    }, {
      pic: '../img/product/3.png',
      dec: '三的 SD-JR09绞肉机家用电动碎肉机不锈钢搅拌机小型搅馅打蒜蓉',
      price: 99
    }, {
      pic: '../img/product/2.png',
      dec: '三的 SD-JR10家用绞肉机全自动大容量商用碎肉机碎菜搅馅切丝切片',
      price: 299
    }, {
      pic: '../img/product/1.png',
      dec: '三的 SD-JR303绞肉机家用电动小型搅馅切菜打碎肉机蒜泥蒜蓉搅拌机',
      price: 239
    }]
  },
  onLoad(e) {
    var page = this;
    wx.getSystemInfo({
      success: function (res) {
        console.log(res);
        page.setData({ winWidth: res.windowWidth });
        page.setData({ winHeight: res.windowHeight });
      }
    });
  },
  switchNav(e) {
    var id = e.currentTarget.id;
    this.setData({ currentTab: id });
  },
  switchnav(e) {
    var id = e.currentTarget.id;
    this.setData({ tab: id });
  },
  bindTap(e){
    var id = e.currentTarget.id;
    wx.navigateTo({url: '../detail/detail?id='+id})
  }
})